gh-144490: Fix mimalloc debug build#144620
Conversation
|
Does this issue exists in |
It looks like upstream fixed this earlier. The change is semantically the same: they just moved |
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I confirm that test_cppext.TestInteralCAPI pass on Linux with Python built in debug mode.
|
Note: |
|
Sorry, @yoney and @vstinner, I could not cleanly backport this to |
|
Ah, the 3.14 branch is not affected, since the
|
|
Merged, thanks. |
Fix mimalloc C++ compilation error in debug builds.
The
_mi_assert_faildeclaration usesmi_decl_throw, which expands to__THROW(for__GNUC__). In C,__THROWis__attribute__((__nothrow__))and works anywhere. In C++,__THROWisnoexcept(true), which must come after the parameter list.Before:
After:
This fix also allows removing the
Py_DEBUGguard intest_cppext/extension.cpp, so internal C API headers are now tested in debug builds too.It’s possible this issue was introduced in #122587, though I haven’t verified it
Test:
cc: @vstinner @colesbury @DinoV